# Init Container Plugin

The `rigdev.init_container` plugin adds an init container to the Capsule's deployment.

The config can be templated with standard Go templating and has

```
.capsule
```

as its templating context.

## Example

Config:

```yaml title="Helm values - Operator"
config:
  pipeline:
    steps:
      - plugins:
          - plugin: rigdev.init_container
            config: |
              container:
                name: my-initcontainer
                image: my-container-image:v1.1
```

The resulting Deployment resource of the Capsule

```
kind: Deployment
...
spec:
  template:
    spec:
      initContainers:
        - name: my-initcontainer
          image: my-container-image:v1.1
      ...
```

## Config



Configuration for the init_container plugin

| Field | Description |
| --- | --- |
| `container` _[Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#container-v1-core)_ | Container holds the configuration for the init container |



